/**
 * 2018年12月24日上午9:56:41
 * @author 谢进财
 */
package com.baihang.project.ds.model.dbMap;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

import com.baihang.project.ds.model.EmployeeModel;

/**
 * @author whati
 *
 */
@Repository
public class EmployeeRowMapper implements RowMapper<EmployeeModel> {

	/* (non-Javadoc)
	 * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int)
	 */
	@Override
	public EmployeeModel mapRow(ResultSet rs, int rowNum) throws SQLException {
		EmployeeModel   model = new EmployeeModel();
		model.setAuthorityId(rs.getInt("authorityid"));
		model.setHouseId(rs.getInt("houseid"));
		model.setId(rs.getInt("ID"));
		model.setIdCard(rs.getString("idcard"));
		model.setMenus(rs.getString("menus"));
		model.setName(rs.getString("name"));
		model.setPassword(rs.getString("pwd"));
		model.setTel(rs.getString("tel"));
		model.setUserName(rs.getString("uid"));
		return model;
	}

}
